package com.tang;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class AwardRes {

    public static final String SUCCESS = "0000";
    public static final String SUCCESS_INFO = "发放成功";

    public static final String FAIL = "0001";
    public static final String FAIL_INFO = "发放失败";

    private String code;
    private String info;

    public static AwardRes OK() {
        return new AwardRes(SUCCESS, SUCCESS_INFO);
    }

    public static AwardRes OK(String successInfo) {
        return new AwardRes(SUCCESS, successInfo);
    }

    public static AwardRes ERROR() {
        return new AwardRes(SUCCESS, FAIL_INFO);
    }

    public static AwardRes ERROR(String errorInfo) {
        return new AwardRes(FAIL, errorInfo);
    }



}
